package com.dk.service.impl;

import com.dk.entity.TAdmin;
import com.dk.mapper.TAdminMapper;
import com.dk.service.ITAdminService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2021-10-29
 */
@Service
public class TAdminServiceImpl extends ServiceImpl<TAdminMapper, TAdmin> implements ITAdminService {

    @Autowired
    private TAdminMapper adminMapper;

    //判断手机号有没有注册过
    @Override
    public TAdmin selectByPhone(String phone) {
        return adminMapper.selectByPhone(phone);
    }

    //判断用户名是否重复
    @Override
    public TAdmin selectUserByUserName(String username) {
        return adminMapper.selectUserByUserName(username);
    }
}
